<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <%@ include file="header.jsp"%>
  <%@taglib prefix="myFn" uri="http://situ.com/rbac" %>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>CRM管理系统</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">CRM管理系统</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="">控制台</a></li>
      <li class="layui-nav-item"><a class="site-demo-active" href="javascript:;" data-url="${path}/product/getProductPage">商品管理</a></li>
      <li class="layui-nav-item"><a class="site-demo-active" href="javascript:;" data-url="${path}/customer/getCustomerPage">客户</a></li>
      <li class="layui-nav-item">
        <a href="javascript:;">其它系统</a>
        <dl class="layui-nav-child">
          <dd><a href="">邮件管理</a></dd>
          <dd><a href="">消息管理</a></dd>
          <dd><a href="${path}/">授权管理</a></dd>
        </dl>
      </li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
          贤心
        </a>
        <dl class="layui-nav-child">
          <dd><a href="">基本资料</a></dd>
          <dd><a href="">安全设置</a></dd>
          <dd><a href="javascript:logout()">账号注销</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item"><a href="javascript:exit()">退出</a></li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">

        <%--<c:if test="${myFn:checkPermission('spgl:/product/getPrductPage')}">
          <li class="layui-nav-item layui-nav-itemed">
            <a class="" href="javascript:;">商品管理</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" data-url="${path}/product/getProductPage" class="site-demo-active">商品管理</a></dd>
            </dl>
          </li>
        </c:if>

        <c:if test="${myFn:checkPermission('yxgl:/saleChance/getSaleChancePage')}">
          <li class="layui-nav-item">
            <a class="" href="javascript:;">营销管理</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" data-url="${path}/saleChance/getSaleChancePage" class="site-demo-active">营销管理</a></dd>
            </dl>
          </li>
        </c:if>

        <c:if test="${myFn:checkPermission('ddgl:/order/getOrderPage')}">
          <li class="layui-nav-item">
            <a class="" href="javascript:;">订单管理</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" data-url="${path}/order/getOrderPage" class="site-demo-active">订单管理</a></dd>
            </dl>
          </li>
        </c:if>--%>

        <c:if test="${myFn:checkPermission('yxgl:/saleChance/getSaleChancePage')}">
          <li class="layui-nav-item"><a class="site-demo-active" href="javascript:;" data-url="${path}/saleChance/getSaleChancePage">营销管理</a></li>
        </c:if>
       <%-- <c:if test="${myFn:checkPermission('yxgl:/product/getProductPage')}">
            <li class="layui-nav-item"><a class="site-demo-active" href="javascript:;" data-url="${path}/product/getProductPage">商品管理</a></li>
        </c:if>--%>

        <c:if test="${myFn:checkPermission('yhqx:/user/getUserPage')}">
          <li class="layui-nav-item"><a class="site-demo-active" href="javascript:;" data-url="${path}/user/getUserPage">员工管理</a></li>
        </c:if>
        <c:if test="${myFn:checkPermission('yhqx:/user/getRolePage')}">
          <li class="layui-nav-item"><a class="site-demo-active" href="javascript:;" data-url="${path}/role/getRolePage">职位管理</a></li>
        </c:if>
        <c:if test="${myFn:checkPermission('yhqx:/user/getPermissionPage')}">
          <li class="layui-nav-item"><a class="site-demo-active" href="javascript:;" data-url="${path}/permission/getPermissionPage">权限管理</a></li>
        </c:if>
      </ul>
    </div>
  </div>
  
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <iframe name="rightframe" width="99%" height="97%" src="/company_web/web/404.jsp"></iframe>
  </div>
  
  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © layui.com - 底部固定区域
  </div>
</div>
<script>
	$('.site-demo-active').click(function() {
		window.open($(this).data('url'), "rightframe");
	});
	layui.use('element', function(){
	  var element = layui.element;
	  element.render();
	  
	});
	
	function exit() {
		mylayer.confirm("您确认要退出吗?", '<%--${path}/user/logout.action--%>${path}/user/getLoginPage',
        );
        /*window.location.href = "${path}/user/getLoginPage"*/

	}

    function logout() {
      mylayer.confirm("您确认要注销吗?", '<%--${path}/user/logout.action--%>${path}/user/deleteById',
      );
      /*window.location.href = "${path}/user/getLoginPage"*/

    }
</script>
</body>
</html>